int s_len = strlen(s);
if (s_len < 4) {
/* less than 1 epochsecond, an unusual case */
- wpt->SetCreationTime(0,(int) atoi(s));
+ wpt->SetCreationTime(0, atoi(s));
} else {
char buff[32];
int off = s_len - 3;
} else {
centisecs = 0;
}
- wpt_tmp->SetCreationTime(t, 10.0 * centisecs);
+ wpt_tmp->SetCreationTime(t, 10 * centisecs);
track_add_wpt(track_head, wpt_tmp);
}
* that interesting to us anyway.
*/
#define EPOCH_TICKS 621355968000000000.0
-void dotnet_time_to_time_t(double dotnet, time_t *t, int *ms)
+void dotnet_time_to_time_t(double dotnet, time_t *t, int *millisecs)
{
+ // TODO: replace this with better interface with normal return values
+ // and called via a QDateTime.
*t = (dotnet - EPOCH_TICKS) / 10000000.;
#if LATER
// TODO: work out fractional seconds.
- if (ms) {
- *ms = dotnet % 10000;
+ if (millisecs) {
+ *millisecs = dotnet % 10000;
}
#endif
}
tmStruct.tm_isdst =-1;
double usec = fmod(1000000*seconds+0.5,1000000);
- wpt_tmp->SetCreationTime(mkgmtime(&tmStruct),lround(usec/1000.0));
+ wpt_tmp->SetCreationTime(mkgmtime(&tmStruct), lround(usec/1000.0));
wpt_tmp->shortname = (char*) xcalloc(16,1);
snprintf(wpt_tmp->shortname, 15 , "WP%04d", ++serial);